package com.mi.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *对订单表的响应处理
 */
@WebServlet("/AddOrdersAction")
public class AddOrdersAction extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * 将购物车中的商品加入订单表中的请求处理
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// 
		int i=1;
		if(i > 0) {
			// 请求成功
			// 对ajax请求进行响应
			PrintWriter pw = response.getWriter();
			// write方法写入字符串
			pw.write("加入订单成功！");
			pw.flush();
		}
		
	}

}
